|
|
|
BlueCielo Meridian Enterprise 2012 Developer's Guide | BlueCielo ECM Solutions |
The Execute method assumes:
The Task Server cannot impersonate end users. This implies that a document cannot be updated if it is a working copy. This is not a problem when Work Isolation mode has been disabled. The Execute method will first check the work isolation mode (Work Isolation Mode ). If WIM is enabled, the method will fail with the message "Isolation mode is enabled."
Next, it performs three operations that are discussed separately:
Private Function IAMTask_Execute(ErrorText As String) As Boolean On Error GoTo eh IAMTask_Execute = False Dim iPersist As IPersistAMObject Dim iExtendedObject As IAMExtendedObject Dim CustomerID As String Dim Name As String Dim Address As String Dim AccountNumber As String Dim City As String Dim Zipcode As String m_Retry = False If Not m_Repository Is Nothing Then ' Check the isolation mode Dim wim As IAMWorkIsolationMode Set wim = m_Repository If wim.WorkIsolationMode = True Then ' This task runs under a fixed user account (default 'System') ' Working copies will not be accessable if Isolation mode is enabled ErrorText = "Isolation mode is enabled" IAMTask_Execute = False Exit Function End If If Not m_FSObject Is Nothing Then Set iPersist = m_FSObject Set iExtendedObject = iPersist.AMObject If iExtendedObject.IsLocked Then
' The document is Locked (in use)
' This task will be rescheduled at a later time.
m_Retry = True
IAMTask_Execute = True
Else
' Update the lookup list with the current Customer Names
Call UpdateCustomerLookupList (m_Repository, m_argLookupName)
CustomerID = m_argCustomerID
Name = m_argCustomerName
' Lookup the project property values
Call GetCustomerInformation (CustomerID, Name, Address, AccountNumber, City, Zipcode)
' Set the property values for the selected document
Call SetCustomerProperties (m_FSObject, m_Repository, _
CustomerID, Name, Address, AccountNumber, City, Zipcode)
IAMTask_Execute = True
End If Else ErrorText = "Document is not available" End If Else ErrorText = "Vault could not be opened" End If Exit Function eh: IAMTask_Execute = False ErrorText = Err.Description End Function
Copyright © 2000-2012 BlueCielo ECM Solutions |